Pollard's lambda algorithm